package com.zmc.admin.infrastructure.dao;

import com.zmc.admin.infrastructure.entity.SysUserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmc.admin.infrastructure.bean.query.SysUserQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户信息表
 * 
 * @author zmc
 * @email 
 * @date 2024-10-09 17:27:49
 */
@Mapper
public interface SysUserDao extends BaseMapper<SysUserEntity> {

    SysUserEntity checkPhoneUnique(String phonenumber);

    SysUserEntity checkEmailUnique(String email);

    int resetUserPwd(@Param("userName") String userName, @Param("newPassword") String newPassword);


    SysUserEntity checkUserNameUnique(@Param("userName") String userName);

    boolean insertUser(SysUserEntity sysUser);

    List<SysUserEntity> selectAllocatedList(SysUserQuery user);

    List<SysUserEntity> selectUnallocatedList(SysUserQuery user);

}
